home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PORTABLE.ZIP / WINCH.C < prev    next >
Text File  |  1992-11-21  |  2KB  |  54 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3. #undef winch
  4.  
  5. #ifndef        NDEBUG
  6. char *rcsid_winch = "$Header: c:/curses/portable/RCS/winch.c%v 2.0 1992/11/15 03:29:08 MH Rel $";
  7. #endif
  8.  
  9.  
  10.  
  11.  
  12. /*man-start*********************************************************************
  13.  
  14.   winch()      - return character from window
  15.  
  16.   X/Open Description:
  17.        The character at the current position in the named window is
  18.        returned.  If any attributes are set for that position, their
  19.        values will be bitwise-OR'ed into the value returned.  The
  20.        pre-defined constants A_CHARTEXT and A_ATTRIBUTES, defined in
  21.        <curses.h>, can be used with the & (bitwise-AND) operator to
  22.        extract the character or attribute alone.
  23.  
  24.        NOTE: inch(), winch(), mvinch() and mvwinch() are macros.
  25.  
  26.   PDCurses Description:
  27.        There is no additional PDCurses functionality.  This routine
  28.        is here as a documentation placeholder.  No code will be
  29.        executed in this module, unless the user #undefs winch.
  30.  
  31.   X/Open Return Value:
  32.        Upon successfull completion, the inch(), mvinch(), mvwinch(),
  33.        and winch() functions return the character at the selected
  34.        position.  Otherwise, the mvinch() and mvwinch() functions
  35.        return ERR.
  36.  
  37.   PDCurses Errors:
  38.        It is an error to call this function with a NULL window pointer.
  39.        It is also an error to address a position that is outside the
  40.        bounds of the specified window.
  41.  
  42.   Portability:
  43.        PDCurses        chtype winch( WINDOW* win );
  44.        X/Open Dec '88  chtype winch( WINDOW* win );
  45.        BSD Curses      
  46.        SYS V Curses    int winch( WINDOW* win );
  47.  
  48. **man-end**********************************************************************/
  49.  
  50. chtype winch(WINDOW *win)
  51. {
  52.        return( win->_y[win->_cury][win->_curx] );
  53. }
  54.